import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from '../views'
import Home from "@/views/Home";
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: Index,
    redirect:'/home',
    children:[{
      path:'/home',
      component:Home
    },{
      path:'/yuyue',
      component:()=>import("@/views/yuyue")
    },{
      path:'/news',
      component:()=>import("@/views/news")
    },{
      path:'/company',
      component:()=>import("@/views/company")
    },{
      path: '/about',
      component: () => import( '@/views/About')
    },{
      path: '/anli',
      component: () => import( '@/views/anli')
    },{
      path: '/subject',
      component: () => import( '@/views/subject')
    },{
      path: '/kecheng',
      component: () => import( '@/views/kecheng')
    },{
      path: '/kdetail',
      component: () => import( '@/views/kdetail')
    },{
      path: '/ndetail',
      component: () => import( '@/views/ndetail')
    },{
      path: '/callme',
      component: () => import( '@/views/callme')
    },{
      path: '/sdetail',
      component: () => import( '@/views/sdetail')
    },{
      path: '/kaoshi',
      component: () => import( '@/views/kaoshi')
    },{
      path: '/adetail',
      component: () => import( '@/views/anlidetail')
    }]
  }
]

const router = new VueRouter({
  mode: 'hash',
  routes
})

export default router
